package com.bwie.service.impl;


import com.bwie.config.SnowFlakeUtil;
import com.bwie.dao.OrderFromDao;
import com.bwie.dao.SeckillDao;
import com.bwie.entity.Order;
import com.bwie.entity.User;
import com.bwie.service.OrderFromService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpSession;
import java.util.Date;

@Service
public class OrderFromServiceImpl implements OrderFromService {
    @Autowired
    private OrderFromDao orderFromDao;

    @Override
    public int insert(Order order) {
        //获取订单编号
        order.setOrderCreateTime(new Date());
        order.setOrderStatus(0);
        order.setPostage(order.getPostage());

        return orderFromDao.insert(order);
    }
}
